﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Views="clr-namespace:Studio77.GuessLyric.Views"
    xmlns:UI="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
    x:Class="Studio77.GuessLyric.Pages.GamePage"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <Style x:Key="ButtonStyleBack" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image x:Name="image" Source="/Images/btn_back.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
                                <Image.RenderTransform>
                                    <CompositeTransform/>
                                </Image.RenderTransform>
                            </Image>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleTip" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image Source="/Images/btnTip.png" Stretch="Fill"/>
                            <Image x:Name="image" Source="/Images/btnTip_press.png" Stretch="Fill" Visibility="Collapsed"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyle1" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image x:Name="image" Source="/Studio77.GuessLyric;component/Images/btn_Next.png" Stretch="Fill" Width="204" Height="72" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                            <Image x:Name="image1" Source="/Studio77.GuessLyric;component/Images/btn_Next_press.png" Stretch="Fill" Visibility="Collapsed" Width="204" Height="72"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleShare" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image x:Name="image1" Source="/Images/btn_Share.png" Stretch="Fill"/>
                            <Image x:Name="image" Source="/Images/btn_Share_press.png" Stretch="Fill" Visibility="Collapsed"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->

    <phone:PhoneApplicationPage.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </phone:PhoneApplicationPage.FontFamily>
    <phone:PhoneApplicationPage.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </phone:PhoneApplicationPage.FontSize>
    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </phone:PhoneApplicationPage.Foreground>
    <Grid x:Name="gridRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="119*"/>
            <RowDefinition Height="135*"/>
            <RowDefinition Height="55"/>
            <RowDefinition Height="13"/>
            <RowDefinition Height="144"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <Image Source="/Images/mainpage.png" Stretch="Fill" Grid.RowSpan="6"/>
        <Grid Margin="0,12,10,0" HorizontalAlignment="Right" VerticalAlignment="Top" Width="151" Height="56">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="56*"/>
                <ColumnDefinition Width="95*"/>
            </Grid.ColumnDefinitions>
            <Image Source="/Images/coin_back.png" Stretch="Fill" Grid.ColumnSpan="2"/>
            <TextBlock Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,5,0" TextWrapping="Wrap" Text="{Binding Text, ElementName=txtCoinCount}" VerticalAlignment="Center" Foreground="White" FontFamily="Segoe WP Semibold" FontSize="32" RenderTransformOrigin="0.5,0.5">
                <TextBlock.RenderTransform>
                    <CompositeTransform TranslateX="2" TranslateY="2"/>
                </TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="txtCoinCount" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,5,0" TextWrapping="Wrap" Text="7777" VerticalAlignment="Center" Foreground="Black" FontFamily="Segoe WP Semibold" FontSize="32"/>
        </Grid>
        <Button x:Name="btnBack" Content="Button" Margin="10,18,0,0" Style="{StaticResource ButtonStyleBack}" Width="97" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Click="btnBack_Click"/>
        <Image x:Name="imgQuesType" Margin="46,125,200,0" Source="/Images/guessType1.png" Stretch="Fill" Width="234" Height="57" HorizontalAlignment="Center" VerticalAlignment="Top"/>
        <Grid Margin="10,0" VerticalAlignment="Bottom" Height="48">
            <Image x:Name="imgSinger" Source="/Studio77.GuessLyric;component/Images/glamrock_singer.png" Stretch="Fill" Width="48" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            <Image x:Name="imgSong" Source="/Studio77.GuessLyric;component/Images/CD avant blanc.png" Stretch="Fill" Width="48" Height="48" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <TextBlock x:Name="txtSinger" HorizontalAlignment="Left" Margin="53,0,0,0" TextWrapping="Wrap" Text="张学友" VerticalAlignment="Center" FontSize="26.667" Foreground="#FFF7FF54"/>
            <TextBlock x:Name="txtSong" HorizontalAlignment="Right" Margin="0,0,53,0" TextWrapping="Wrap" Text="吻别" VerticalAlignment="Center" FontSize="26.667" Foreground="#FFF7FF54"/>
        </Grid>
        <ScrollViewer Grid.Row="1" Margin="30,10,0,10" >
            <TextBlock x:Name="txtContent" TextWrapping="Wrap" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="26.667" Foreground="White"/>
        </ScrollViewer>
        <Button x:Name="btnShare" Content="Button" HorizontalAlignment="Left" Height="174" Margin="0" Grid.Row="1" Style="{StaticResource ButtonStyleShare}" VerticalAlignment="Center" Width="36" Click="btnShare_Click"/>
        <StackPanel x:Name="stackDaan" HorizontalAlignment="Center" Grid.Row="2" VerticalAlignment="Center" Orientation="Horizontal"/>
        <Views:Keyboard x:Name="keyboard" HorizontalAlignment="Left" Grid.Row="4" VerticalAlignment="Top" Width="480"/>
        <Button x:Name="btnTip" Content="Button" Margin="340,116,10,65" Style="{StaticResource ButtonStyleTip}" Click="btnTip_Click"/>
        <Path Data="M10,571 L470.07,571" Fill="#FFE8E8E8" HorizontalAlignment="Center" Height="1" Grid.Row="3" Stretch="Fill" Stroke="Gainsboro" UseLayoutRounding="False" VerticalAlignment="Center" Width="461"/>
        <Grid x:Name="gridComplete" Height="800" Grid.RowSpan="6" Width="480" Background="#E5000000" Visibility="Collapsed">
            <TextBlock HorizontalAlignment="Center" Margin="0,170,0,0" TextWrapping="Wrap" Text="答案" VerticalAlignment="Top" FontSize="48" Foreground="White"/>
            <TextBlock x:Name="txtDaan" HorizontalAlignment="Center" Margin="0,260,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#FFF3FF00" FontSize="32"/>
            <Image Margin="0,345,0,0" Source="/Images/coin-yuan.png" Stretch="Fill" Width="79" Height="79" HorizontalAlignment="Center" VerticalAlignment="Top"/>
            <TextBlock x:Name="txtAddCoin" HorizontalAlignment="Center" Margin="0,445,0,0" TextWrapping="Wrap" Text="+3" VerticalAlignment="Top" Foreground="#FFF3FF00" FontSize="48"/>
            <Button x:Name="btnNext" Content="Button" HorizontalAlignment="Center" Height="72" Margin="0,596,0,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="204" Click="btnNext_Click"/>
        </Grid>
        <Grid Margin="185,10,185,0" HorizontalAlignment="Center" VerticalAlignment="Top" Height="110" Width="110">
            <Image Source="/Images/stageStar.png" Stretch="Fill" Width="110" Height="110" HorizontalAlignment="Center" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe WP Black" FontSize="40" Text="{Binding Text, ElementName=txtCurrentStage}" Foreground="Black" RenderTransformOrigin="0.5,0.5">
                <TextBlock.RenderTransform>
                    <CompositeTransform TranslateX="2" TranslateY="3"/>
                </TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="txtCurrentStage" HorizontalAlignment="Center" TextWrapping="Wrap" Text="7777" VerticalAlignment="Center" FontFamily="Segoe WP Black" FontSize="40" Foreground="White"/>
        </Grid>
        <Image x:Name="imgBanner" Grid.Row="5" Source="/Images/banner1.jpg" Stretch="Fill" Width="480" Height="80" VerticalAlignment="Bottom" Tap="imgBanner_Tap"/>
        <UI:AdControl x:Name="adControlMicrosoft" ApplicationId="1af633f3-6790-4d52-a6bd-7f6197bf8d7c" AdUnitId="137553" HorizontalAlignment="Left" Height="80" Grid.Row="5" VerticalAlignment="Bottom" Width="480"/>
        <Grid x:Name="gridMsnAd" Grid.Row="5" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,8"/>
    </Grid>

</phone:PhoneApplicationPage>